<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>芯佑电商_产品搜索</title>
    <!--==网站图标==-->
    <#include "/website/commonWebsite.html">
    <script src="/website/js/jqPaginator.min.js" type="text/javascript"></script>
    <link href="/website/css/j-pagination.css" rel="stylesheet" type="text/css"/>
</head>
<body>

<!--==头部==-->
<div class="header">
    <#include "/website/header.html">
</div>
<!--==内容区域==-->
<div class="home_n">
    <div  class="home_nr">
        <!--==搜索==-->
        <div class="pro-search">根据您搜索的关键字<strong> ${condition} </strong>为您找到以下商品</div>
        <!--==产品==-->
        <div class="home_list">
            <!--内容-->
            <div class="home_list_n">
                <#if productList?? && productList?size &gt;0>
                    <#list productList as item>
                        <div class="home_list_nr">
                            <#assign imgPaths=item.item_image?split(";")>
                                <h1><a href="/website/productDetails?productPk=${item.id}"><img src="//${imgPaths[0]}" width="275" height="275"></a></h1>
                            <#if item.type==1>
                                <h2><img src="/website/images/home_11.png"></h2>
                            <#elseif item.type==2>
                                <h2><img src="/website/images/home_12.png"></h2>
                            </#if>
                            <dl>
                                <dt><a href="/website/productDetails?productPk=${item.id}">${item.item_name} ${item.item_title}</a></dt>
                                <#if item.item_sale??&&item.item_sale!="">
                                    <dd>${item.item_sale}<del>${item.item_price}</del></dd>
                                <#else>
                                    <dd>${item.item_price}</dd>
                                </#if>
                            </dl>
                        </div>
                    </#list>
                </#if>
            </div>
        </div>
        <!--翻页-->
        <div class="audio_cur_nr_fy">
            <ul class="pagination" id="pagination">
            </ul>
            <input type="hidden" id="PageCount" runat="server" />
            <input type="hidden" id="PageSize" runat="server" value="30" />
            <input type="hidden" id="countindex" runat="server" value="30" />
            <input type="hidden" id="visiblePages" runat="server" value="7" />
        </div>
    </div>
</div>

<!--==  版权  ==-->
<script type="text/javascript">
    function load_home() {
        document.getElementById("viewDiv").innerHTML = '';
    }
</script>
<object type="text/html" data="/website/copyright" width="100%" height="370px" style="margin-bottom: -5px;"></object>

<!--==  返回头部  ==-->
<script type="text/javascript" src="/website/js/backtop.js"></script>
</body>
<script>
    $(function () {
        loadpage();//加载分页
    })

    function loadpage() {
        $("#PageCount").val("${totalPage}");
        var myPageCount = parseInt($("#PageCount").val());
        var myPageSize = parseInt($("#PageSize").val());
        var countindex = myPageCount % myPageSize > 0 ? (myPageCount / myPageSize) + 1 : (myPageCount / myPageSize);
        $("#countindex").val(countindex);

        $.jqPaginator('#pagination', {
            totalPages: parseInt($("#countindex").val()),
            visiblePages: parseInt($("#visiblePages").val()),
            currentPage: 1,
            first: '<li class="first"><a href="javascript:;">首页</a></li>',
            prev: '<li class="prev"><a href="javascript:;"><i class="arrow arrow2"></i>上一页</a></li>',
            next: '<li class="next"><a href="javascript:;">下一页<i class="arrow arrow3"></i></a></li>',
            last: '<li class="last"><a href="javascript:;">末页</a></li>',
            page: '<li class="page"><a href="javascript:;">{{page}}</a></li>',
            onPageChange: function (num, type) {
                if (type == "change") {
                    location.href="webseite/searchAll?page="+num+"&limit=40";
                    /*$.ajax({
                        url : '/website/home/activitylist',
                        type : 'GET',
                        data : {
                            'page' : num,
                            'limit' : 16
                        },
                        dataType : 'JSON',
                        success : function(resp) {
                            apperndFunction(resp.data.list);
                            loadData(resp.data.total);
                        }
                    });*/
                }
            }
        });
    }
</script>
</html>